$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
+ $(srcdir)/images/appchooserbutton.png \
+ $(srcdir)/images/appchooserdialog.png \
$(srcdir)/images/assistant.png \
$(srcdir)/images/button.png \
$(srcdir)/images/check-button.png \
<link linkend="GtkFontButton">
<inlinegraphic fileref="font-button.png" format="PNG"></inlinegraphic>
</link>
+ <link linkend="GtkAppChooserButton">
+ <inlinegraphic fileref="appchooserbutton.png" format="PNG"></inlinegraphic>
+ </link>
<link linkend="GtkFrame">
<inlinegraphic fileref="frame.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkFileChooserDialog">
<inlinegraphic fileref="filechooser.png" format="PNG"></inlinegraphic>
</link>
+ <link linkend="GtkAppChooserDialog">
+ <inlinegraphic fileref="appchooserdialog.png" format="PNG"></inlinegraphic>
+ </link>
<link linkend="GtkSwitch">
<inlinegraphic fileref="switch.png" format="PNG"></inlinegraphic>
</link>
return info;
}
+static WidgetInfo *
+create_appchooserbutton (void)
+{
+ GtkWidget *picker;
+ GtkWidget *align, *vbox;
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+ align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
+ picker = gtk_app_chooser_button_new ("text/plain");
+ gtk_container_add (GTK_CONTAINER (align), picker);
+ gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ gtk_label_new ("Application Button"),
+ FALSE, FALSE, 0);
+
+ return new_widget_info ("appchooserbutton", vbox, SMALL);
+}
+
+static WidgetInfo *
+create_appchooserdialog (void)
+{
+ WidgetInfo *info;
+ GtkWidget *widget;
+
+ widget = gtk_app_chooser_dialog_new_for_content_type (NULL, 0, "image/png");
+ gtk_window_set_default_size (GTK_WINDOW (widget), 200, 300);
+
+ info = new_widget_info ("appchooserdialog", widget, ASIS);
+ info->include_decorations = TRUE;
+
+ return info;
+}
+
GList *
get_all_widgets (void)
{
retval = g_list_prepend (retval, create_print_dialog ());
retval = g_list_prepend (retval, create_volume_button ());
retval = g_list_prepend (retval, create_switch ());
+ retval = g_list_prepend (retval, create_appchooserbutton ());
+ retval = g_list_prepend (retval, create_appchooserdialog ());
return retval;
}
* Authors: Cosimo Cecchi <ccecchi@redhat.com>
*/
+/**
+ * SECTION:gtkappchooser
+ * @Title: GtkAppChooser
+ * @Short_description: Interface implemented by widgets allowing to chooser applications
+ *
+ * #GtkAppChooser is an interface that can be implemented by widgets which
+ * allow the user to choose an application (typically for the purpose of
+ * opening a file). The main objects that implement this interface are
+ * #GtkAppChooserWidget, #GtkAppChooserDialog and #GtkAppChooserButton.
+ */
+
#include "config.h"
#include "gtkappchooser.h"
* Authors: Cosimo Cecchi <ccecchi@redhat.com>
*/
+/**
+ * SECTION:gtkappchooserbutton
+ * @Title: GtkAppChooserButton
+ * @Short_description: A button to launch an application chooser dialog
+ *
+ * The #GtkAppChooserButton is a widget that lets the user select
+ * an application. It implements the #GtkAppChooser interface.
+ */
#include "config.h"
#include "gtkappchooserbutton.h"
* Cosimo Cecchi <ccecchi@redhat.com>
*/
+/**
+ * SECTION:gtkappchooserdialog
+ * @Title: GtkAppChooserDialog
+ * @Short_description: An application chooser dialog
+ *
+ * #GtkAppChooserDialog shows a #GtkAppChooserWidget inside a #GtkDialog.
+ *
+ * Note that #GtkAppChooserDialog does not have any interesting methods
+ * of its own. Instead, you should get the embedded #GtkAppChooserWidget
+ * using gtk_file_chooser_dialog_get_widget() and call its methods if
+ * the gneeric #GtkAppChooser interface is not sufficient for your needs.
+ */
#include "config.h"
#include "gtkappchooserdialog.h"
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
+/**
+ * SECTION:gtkappchooserwidget
+ * @Title: GtkAppChooserWidget
+ * @Short_description: Application chooser widget that can be embedded in other widgets
+ *
+ * #GtkAppChooserWidget is a widget for selecting applications.
+ * It is the main building block for #GtkAppChooserDialog. Most
+ * applications only need to use the latter; but you can use
+ * this widget as part of a larger widget if you have special needs.
+ */
+
struct _GtkAppChooserWidgetPrivate {
GAppInfo *selected_app_info;